'''
类似Json 序列号，但是可以序列化的类型更多 类、函数；
仅限在python中使用
'''
import pickle
'''
#write to file
dict ={'name':'lejia','age':'18'}
f_write = open(r'pickle_dict.txt','wb')
pickle.dump(dict,f_write)
f_write.close()
'''

#read from file
f_read = open(r'pickle_dict.txt','rb')
original_data = pickle.load(f_read)
print(original_data)
print(type(original_data))

f_read.close()